package com.lws.framework.listener;

import javax.servlet.ServletContextEvent;

import org.springframework.web.context.support.WebApplicationContextUtils;

import com.lws.framework.context.Context;

public class ServletContextListener implements javax.servlet.ServletContextListener {

    @Override
    public void contextDestroyed(ServletContextEvent event) {
    }

    @Override
    public void contextInitialized(ServletContextEvent event) {
        Context.APPLICATIONCONTEXT = WebApplicationContextUtils//
        .getRequiredWebApplicationContext(Context.SERVLETCONTEXT = event.getServletContext());
    }
}
